<template>
  <span>
  </span>
</template>

<script>
import { mapActions } from "vuex";
export default {
  name: 'WaybillDeviceLoader',
  props: {
    waybillId: Number
  },
  computed: {
  },
  created () {
    if (this.waybillId) {
      this.loadDevice({ waybillId: this.waybillId });
    }
  },
  methods: {
    ...mapActions({ loadDevice: 'deviceTrace/waybillDeviceTrace' })
  },
  watch: {
    waybillId (waybillId) {
      this.loadDevice({ waybillId: waybillId })
    }
  },
}
</script>